/*
 * Author: Alberto De Pena
 * Applied Algorithms
 * gopher.cpp
*/
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;

void main()
{
    ifstream fin;
    ofstream fout;

    fin.open( "gopher.in" );
    fout.open( "gopher.out" );

	float x_Gopher, y_Gopher, x_Dog, y_Dog, distanceG, distanceD;
	float x_Hole[1000], y_Hole[1000]; 
    int holeNumber, hole, safety, i;
	bool escape;

    fin >> holeNumber;
    while( holeNumber > 0 )
    {
        fin >> x_Gopher >> y_Gopher >> x_Dog >> y_Dog;
        for( i = 0; i < holeNumber; i++ )
        {
            fin >> x_Hole[i] >> y_Hole[i];
        }

        escape = false;
        for( i = 0; i < holeNumber && escape == false; i++ )
        {
            distanceG = ( x_Gopher-x_Hole[i]) * (x_Gopher-x_Hole[i]) + (y_Gopher-y_Hole[i]) * (y_Gopher-y_Hole[i]);

            distanceD = ( x_Dog-x_Hole[i]) * (x_Dog-x_Hole[i]) + (y_Dog-y_Hole[i]) * (y_Dog-y_Hole[i]);

            if( distanceG / distanceD <= 0.250 )
            {
                escape = true;
                safety = i;
            }
        }

        fout.precision( 3 );
        fout << fixed;

        if( escape )
        {
            fout << "The gopher can escape through the hole at (" << x_Hole[safety] << "," << y_Hole[safety] << ")." << endl;
        }
        else
        {
            fout << "The gopher cannot escape." << endl;
        }

        fin >> holeNumber;
    }

    fin.close();
    fout.close();
}

